package main

import (
	"fmt"
	"gitee.com/weidongkl/similarity"
	"gitee.com/weidongkl/similarity/jaccard"
)

func main() {
	calc := jaccard.New()
	s1 := "base"
	sArr := []string{"test1", "test2", "test3"}

	sortedItems, err := similarity.CalculateArray(calc, s1, sArr)
	if err != nil {
		fmt.Println("Error calculating similarities:", err)
	} else {
		fmt.Println("Sorted items by similarity:")
		for _, item := range sortedItems {
			fmt.Printf("%s: %f\n", item.Value, item.Priority)
		}
	}
}
